@extends('layouts.default') @section('main')
    <link rel="stylesheet" href="/css/uniform.css" />
    <link rel="stylesheet" href="/css/select2.css" />
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb">
                <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a>
                <a href="#" class="current">直通车管理</a>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    @if(in_array('add',$actions))<a href="{{url('ztc/create')}}"><button class="btn">新增</button></a>@endif
                    <form action="{{url('ztc/search')}}" method="post">
                        <table>
                            <tr>
                                <th>
                                    <label >投资人昵称 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="nickname"  placeholder="投资人昵称" />
                                    </div>
                                </th>
                                <th>
                                    <label >能否预约 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <select  name="status" class="span11" >
                                            <option value="">请选择</option>
                                            <option value="1">可以预约</option>
                                            <option value="0">不能预约</option>
                                        </select>
                                    </div>
                                </th>
                                <th>
                                    <label >时间段能否协商 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <select  name="time_type" class="span11" >
                                            <option value="">请选择</option>
                                            <option value="1">可以协商</option>
                                            <option value="0">不可以协商</option>
                                        </select>
                                    </div>
                                </th>
                                <th>
                                    <label >类型 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <select  name="type" class="span11" >
                                            <option value="">请选择</option>
                                            <option value="hot">热门</option>
                                            <option value="follow">值得关注</option>
                                            <option value="authority">权威</option>
                                            <option value="new">最新</option>
                                        </select>
                                    </div>
                                </th>
                                <th>
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <div class="controls">
                                        <button type="submit" class="btn btn-info">查询</button>
                                    </div>
                                </th>
                            </tr>
                        </table>
                    </form>
                    <div class="widget-box">
                        <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                            <h5>直通车管理</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>直通车图片</th>
                                    <th>投资人昵称</th>
                                    <th>投资人简介</th>
                                    <th>时间简介</th>
                                    <th>评论管理</th>
                                    <th>直通车使用次数</th>
                                    <th>直通车类型</th>
                                    <th>状态(能否预约)</th>
                                    <th>时间段是否可协商</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($lists as $key => $list)
                                    <tr class="gradeX">
                                        <td><img src="{{getImage($list->image)}}" width="50" height="50" /></td>
                                        <td>@if($list->user){{$list->user->nickname?$list->user->nickname:$list->user->realname}}@endif</td>
                                        <td title="{{$list->intro}}">{{cut_str($list->intro,8)}}</td>
                                        <td>{{$list->time_intro}}</td>
                                        <td> <a href="{{url('ztccomment/index?id='.$list->id)}}">点击管理</a> </td>
                                        <td>{{$list->apply_count}}</td>
                                        <td>@if($list->type == 'new')最新@elseif($list->type == 'hot')热门@elseif($list->type == 'follow')值得关注@elseif($list->type == 'authority')权威@endif</td>
                                        <td>@if($list->status == 1)<i class="icon-ok"></i>@elseif($list->status == 0)<i class="icon-remove"></i>@endif</td>
                                        <td>@if($list->time_type == 1)<i class="icon-ok"></i>@elseif($list->time_type == 0)<i class="icon-remove"></i>@endif</td>
                                        <td class="center">
                                            @if(in_array('edit',$actions))<a data-original-title="编辑" class="tip" href="{{url('ztc/edit?id='.$list->id)}}"><i class="icon-pencil"></i></a>@endif
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                        <?php echo $lists->render();?>
                </div>
            </div>
        </div>
    </div>
    <script src="/js/matrix.tables.js"></script>
@stop
